Skip to main content
Version: 0.1.0

Jump Statements

return

Returns a value or nothing in a function or the global scope. Using return without any arguments returns RCaronInsideEnum.ReturnWithoutValue.

rcaron
func Fun() {
return 1;
}
print Fun();
// Output: 1
rcaron
func Fun() {
return 1;
}
print Fun();
// Output: 1

break

Terminates a loop.

rcaron
$h = 0;
loop {
$h = $h + 1;
if ($h == 5) { break; }
}
print $h;
// Output: 5
rcaron
$h = 0;
loop {
$h = $h + 1;
if ($h == 5) { break; }
}
print $h;
// Output: 5

continue

Continues to the next iteration of a loop.